@extends('user.base')
@section('content-header','Print Case')
@section('content-body')
<div id="report" style="border: 1px solid;" class="container">
	<div id="report-header" class="container-fluid">
		<div class="container">
			<h5>
				Hospital: {{ $user->hospital }}
			</h5>
			<h5>
				Address: {{ $user->address }}
			</h5>
		</div>
	</div>
	<div id="report-body" class="container-fluid">
		<div class="container">
			<h3 style="color: crimson;" align="center">
				Case Report
			</h3>
		</div>
		<hr />
		<div id="patient-info" class="container">
			<div class="col-md-3">
				<label>Name: </label>
				{{$patient->first_name.' '.$patient->last_name }}
			</div>
			<div class="col-md-3">
				<label>Sex:</label>
				{{ $patient->sex}}
			</div>
			<div class="col-md-3">
				<label>Case No.:</label>
				{{ $case->id }}
			</div>
			<div class="col-md-3">
				<label>OS:</label>
				{{ $case->eyesight_left }}
			</div>
			<div class="col-md-3">
				<label>Check Doctor:</label>
				{{ $user->name }}
			</div>
			<div class="col-md-3">
				<label>Age:</label>
				{{ $patient->age }}
			</div>
			<div class="col-md-3">
				<label>Phone:</label>
				{{ $patient->contact_num}}
			</div>
			<div class="col-md-3">
				<label>OD:</label>
				{{ $case->eyesight_right }}
			</div>
			<div class="col-md-6">
				<label>Address:</label>
				{{ $patient->address }}
			</div>
		</div><!--end of patient info-->
		<hr />
		<div id="photos" class="container">
			<div class="container">
				<h3>
					<i>OS:</i>
				</h3>
				@foreach($imgs_os as $img)
				<div class="col-md-3">
					<img src="{{ asset('/cases/2/20150917_132623800_L.jpg')}}"/>
				</div>
				@endforeach
			</div>
			<br />
			<div class="container">
				<h3>
					<i>OD:</i>
				</h3>
				@foreach($imgs_od as $img)
				@endforeach
			</div>
		</div><!-- end of photos-->
	</div><!--end of report body-->
	<div id="report-footer" >
		<div class="col-md-3 pull-right">
			<span>
				<h4>
					Signature:
				</h4>
			</span>
			<span>
				<h4>
					Date:{{ $date }}
				</h4>
			</span>
		</div>
	</div>{{--end of report footer--}}
</div>
@endsection
@section('js')
<script type="text/javascript">
function printReport() {
	document.body.innerHTML = document.getElementById('report').innerHTML;
	window.print();
}
</script>
@endsection
